Add human-readable sector names - #318
Open
atomantic wants to merge 1 commit into
Open
Conversation
Collaborator
|
@atomantic really nice. Fun to think about how we could support sector naming in the future, once your corporation has enough interests in a space. Will give this a good test before merging (thinking about critical-path database queries where index speed matters) but excited to do it. We'll also need to think of a way of updating current world data, so we can migrate without a reset. Should be simple enough! |
Every sector now has a human-readable name (e.g. "Iron Gate", "Photon Midnight Passage"). Names flow from the DB through edge functions to the client banner, sector panel, and map-node popover. Tool calls accept either a sector number or name; the resolver is consolidated into resolveSectorParam. - universe_structure gains a `name` column (migration + LOWER(name) index) - scripts/generate_sector_names.py seeds 5000 unique names (seed=42, 200 adjectives × 200 nouns, ~65% two-word, ~35% three-word) - load_universe_to_supabase.py applies megaport grand names at load time based on universe.meta.mega_port_sectors (so megaport IDs can differ per environment) - SectorSnapshot / LocalMapSector / MapSectorNode carry name through to the client; new formatSectorLabel util used in 3 UI surfaces - MOVE, PLOT_COURSE, PATH_WITH_REGION, LOCAL_MAP_REGION, and COMBAT_ACTION accept sector names in addition to IDs - Voice/task agent prompts teach "ID - Name" display format - Fixes pre-existing pgClient connection leaks in plot_course, path_with_region, local_map_region, combat_action
Contributor
Author
|
whoops, accidentally bundled another idea into this PR. will split into two. |
Contributor
Author
|
I'm not particular about these names just thought it was a fun stab so feel free to go with a different set when you review this idea or implement it a different way :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Players previously navigated by raw sector numbers. This PR gives every sector a human-readable name, flows it through the server, agents, and client, and lets tool calls accept either an ID or a name.
Naming scheme
5000 unique names, deterministic (seed=42), drawn from 200 adjectives × 200 nouns with sci-fi flavor (Quantum, Pulsar, Orion, Kepler, Plasma, Hyperion, Aether, Nexus, etc.). ~65% are two-word, ~35% are three-word. Max token reuse is 61 out of 5000 names; 399 of 400 tokens appear at least once.
Two-word samples: Flux Gorge, Lost Aether, Infinite Network, Nebula Ingress, Deep Kessel, Hex Causeway, Iron Magnet, Echo Reach
Three-word samples: Photon Midnight Passage, Sapphire Sleeping Rampart, Rusted Royal Remnant, Jade Barren Path, Lazuli Drifting Sound, Searing Oblivion Nexus, Liminal High Ravine
Megaport grand names (applied at load time from
meta.mega_port_sectors, cycled if a universe has more megaports than entries): Grand Nexus Station, Federation Prime Hub, Galactic Gateway, Sovereign Command, Imperium Bastion, Core MeridianChanges
universe_structuregains anamecolumn;idx_universe_structure_name_lowerindexesLOWER(name)for case-insensitive resolutionscripts/generate_sector_names.pyseeds the 5000 unique names; generator is universe-agnostic so megaport IDs can differ per environmentload_universe_to_supabase.pyapplies megaport grand names at load time based onuniverse.meta.mega_port_sectorsSectorSnapshot,LocalMapSector,MapSectorNodecarrynameto the client; newformatSectorLabelutil used in banner, sector panel, and map-node popoverresolveSectorParam(pg, payload, key)replaces per-caller sector-name resolution boilerplate inmove,plot_course,path_with_region,local_map_region,combat_action["integer", "string"]for sector params; voice/task prompts teach the "ID - Name" display formatplot_course,path_with_region,local_map_region,combat_actionby addingfinally { pgClient.release(); }symmetric to themovehandler pattern